import urllib.request


def error_use():

    # try:
    #     response = urllib.request.urlopen('https://www.bufsd.com')
    # except Exception as e:
    #     print(e)

    try:
        response = urllib.request.urlopen('https://tool.lu/timestamp/sfdsdf')
    except urllib.request.HTTPError as e:
        print(e.code)
    except urllib.request.URLError as err:
        print(err)
    else:
        print("确实找不到 连报错都没有")


    'urllib.error.URLError: <urlopen error [Errno 8] nodename nor servname provided, or not known>'


error_use()
